* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: url("background picture.png") no-repeat center center fixed;
    background-size: cover;
    position: relative;
    color: #333;
    font-family: "Microsoft Yahei", sans-serif;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.35);
    z-index: -1;
}

h1 {
    text-align: center;
    font-size: 26px;
    font-weight: bold;
    margin: 20px 0;
    color: #2a2f45;
}

.main {
    display: flex;
    flex-direction: row;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 40px;
}

.left-panel {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.box {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
    transition: 0.3s ease;
    position: relative;
}

.box:hover {
    transform: scale(1.01);
    box-shadow: 0 0 20px rgba(0, 174, 255, 0.2);
}

.box h3 {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: bold;
    border-left: 4px solid #2196f3;
    padding-left: 8px;
    color: #2b4f6f;
    position: relative;
    cursor: pointer;
}

/* 悬浮公式提示 */
.box h3 .tooltip {
    display: none;
    position: absolute;
    left: -230px;
    top: 0;
    width: 220px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    color: #333;
    font-size: 13px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 9;
    white-space: normal;
}

.box h3:hover .tooltip {
    display: block;
}

input[type="number"] {
    width: 80px;
    padding: 6px;
    margin-left: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.thickness-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

button {
    margin-top: 10px;
    padding: 8px 16px;
    background: linear-gradient(45deg, #00d2ff, #3a7bd5);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transform: skewX(-45deg);
    transition: all 0.5s ease;
  }

button:hover::after {
    left: 100%;
}

button:hover {
    transform: scale(1.03);
}

.result-box {
    background: rgba(255, 255, 255, 0.5);
    border: 1px dashed #aaa;
    padding: 10px;
    font-size: 14px;
    border-radius: 6px;
    margin-top: 10px;
}

.image-box, .chart-box {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#preview {
    width: 100%;
    height: 250px;
    object-fit: contain;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    border-radius: 8px;
}

canvas#myChart {
    width: 100% !important;
    height: 250px !important;
}

.curve-selector {
    margin-bottom: 10px;
}

.curve-selector label {
    margin-right: 15px;
}

input[type="radio"] {
    margin-right: 5px;
}

.led {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: gray;
    margin-right: 6px;
}

.led.on {
    background-color: #00ff00;
   box-shadow: 0 0 10px #00ff00;
}    